#include "stdafx.h"
#include "src\game\Game.h"
#include "src\gsm\ai\bots\LifePointBot.h"
#include "src\gsm\state\GameStateManager.h"
#include "src\gsm\physics\Physics.h"

LifePointBot::LifePointBot()
{
	LP_Counter = 0;
	Life_Points = new vector<wstring>();
	Life_Points->push_back(L"life_3");
	Life_Points->push_back(L"life_2");
	Life_Points->push_back(L"life_1");
	Life_Points->push_back(L"life_0");
	current_LP_state = Life_Points->at(LP_Counter);
}
LifePointBot::~LifePointBot()
{

}
// CHANGE THE STATE
void LifePointBot::ChangeToNextState()
{
	LP_Counter++;
	if(LP_Counter<4)
	{
		current_LP_state = Life_Points->at(LP_Counter);;
		this->setCurrentState(current_LP_state);
	}

		
}
// UPDATE HP INFO
void LifePointBot::think(Game *game)
{
	Viewport *viewport = game->getGUI()->getViewport();
	PhysicalProperties *pp = this->getPhysicalProperties();
	pp->setPosition(viewport->getViewportX()+10.0,viewport->getViewportY()+15.0);

}

Bot* LifePointBot::clone()
{
	LifePointBot *botClone = new LifePointBot();
	return botClone;
}
